{% extends "base.html" %}
{% load static %}

{% block content %}
<div class="error-container">
  <div class="error-content">
    <div class="error-icon">⚠️</div>
    <h2>页面错误</h2>
    <p class="error-message">{{ error }}</p>
    <div class="error-actions">
      <a href="{% url 'metrics_home' %}" class="btn btn-primary">
        返回指标中心
      </a>
    </div>
  </div>
</div>

<style>
.error-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 2rem;
}

.error-content {
  text-align: center;
  max-width: 500px;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.error-content h2 {
  color: #dc3545;
  margin-bottom: 1rem;
}

.error-message {
  color: #6c757d;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.error-actions {
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: background 0.3s;
}

.btn:hover {
  background: #0056b3;
  color: white;
}
</style>
{% endblock %}
